package user_router

import (
	"benkendSystem/api/user_api"
	"benkendSystem/middleware"
	"github.com/gin-gonic/gin"
)

func UserRouter(r *gin.RouterGroup) {
	user := r.Group("/user").Use(middleware.LoginAuthCheck())
	{
		user.POST("/add", middleware.CheckMenu("adduser"), user_api.AddUser)
		user.POST("/getuserlist", middleware.CheckMenu("getUser"), user_api.GetUserList)
		user.POST("/userdelete", middleware.CheckMenu("deleteUser"), user_api.DeleteUser)
		user.POST("/userupdate", middleware.CheckMenu("updateUser"), user_api.UpdateUser)
		user.POST("/getuserdetail", middleware.CheckMenu("getUser"), user_api.GetUserDetail)
		// user.POST("/updatepassword", middleware.CheckMenu(), user_api.UpdatePassword)
		user.POST("/updatepassword", user_api.UpdatePassword)
	}
}
